package it.controllocredito.wizard;

/*
 * Copyright 2012 Roman Nurik
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import it.controllocredito.wizard.model.AbstractWizardModel;
import it.controllocredito.wizard.model.BranchPage;
import it.controllocredito.wizard.model.DayInfoPage;
import it.controllocredito.wizard.model.MinutiInfoPage;
import it.controllocredito.wizard.model.PageList;
import it.controllocredito.wizard.model.WeekDayInfoPage;
import android.content.Context;

public class PhoneWizardModel extends AbstractWizardModel {
    public PhoneWizardModel(Context context) {
        super(context);
    }

    @Override
    protected PageList onNewRootPageList() {
        return new PageList(
                new BranchPage(this, "Ogni quanto tempo si rinnova la tua offerta per le telefonate?")
                        .addBranch("Ogni mese",
                        		new DayInfoPage(this, "In quale giorno del mese si rinnova l'offerta?")
                        			.setRequired(true),
                        	    new MinutiInfoPage(this, "Quanti minuti gratuiti prevede la tua offerta?")
            						.setRequired(true),
            					new BranchPage(this, "Ci sono numeri verso cui non paghi?")
                        			.addBranch("Si").setValue("Si")
                        			.addBranch("No").setValue("No"))

                        .addBranch("Ogni settimana",
                        		new WeekDayInfoPage(this, "In quale giorno della settimana si rinnova l'offerta?")
            						.setRequired(true),
            				    new MinutiInfoPage(this, "Quanti minuti gratuiti verso tutti prevede la tua offerta?")
									.setRequired(true),
								new BranchPage(this, "Ci sono numeri verso cui non paghi?")
                        			.addBranch("Si").setValue("Si")
                        			.addBranch("No").setValue("No"))

                        .setRequired(true));
    }
}